<template>
    <div>
        <date  @handleConfirm='handleConfirm' :start='startDate' :end='endDate'/>
    </div>
</template>
<script>

// import axios from 'axios'
import date from '../common/datePicker'
import moment from 'moment'
export default {
    name: 'count',
    components: {
        date
    },
    data() {
        return {
            type: '',
            startDate: moment(new Date()).format('YYYY-MM-DD'),
            endDate: moment(new Date()).format('YYYY-MM-DD')
        }
    },
    created: function () {},
    methods: {
        handleConfirm(type, date) {
            // let data = moment(date).format('YYYY-MM-DD')
            if (type === 'start') {
                this.startDate = moment(date).format('YYYY-MM-DD')
            }
            if (type === 'end') {
                this.endDate = moment(date).format('YYYY-MM-DD')
            }
        }
    }
}
</script>
<style>
.weui-media-box {
    background: #2295ff;
    height: 100px;
}
</style>